package com.fingard.dsp.bank.reqrespobj.authcancelforrec;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RetAtsBase;
import com.fingard.xml.XmlTextWriter;

public class RetAtsAuthCancelForRec extends RetAtsBase {
    public RetAtsAuthCancelForRec(ReqRespHeader p_header) {
        retHeader = p_header;
        retXmlWriter = new XmlTextWriter();//用于输出返回ATS的XML报文
    }


    public String respCode;
    public String respInfo;

    public String reqSeqID;

    /**0：成功， 1：失败， 2：异常*/
    public String retCode;
    public String retMsg;

    public String serialNo;

    public void writeRetToATS() {
        retXmlWriter.writeStartDocument();
        retXmlWriter.writeStartElement("ATSYH");
        retXmlWriter.writeStartElement("TransResp");

        retXmlWriter.writeElementString("BankCode", retHeader.bankCode);
        retXmlWriter.writeElementString("TransType", retHeader.transType);
        retXmlWriter.writeElementString("TransSeqID", retHeader.transSeqID);

        retXmlWriter.writeStartElement("DspState");
        retXmlWriter.writeElementString("RespCode", respCode);
        retXmlWriter.writeElementString("RespInfo", respInfo);
        retXmlWriter.writeEndElement();
        retXmlWriter.writeElementString("ReqSeqID", reqSeqID);

        retXmlWriter.writeElementString("RetCode", retCode);
        retXmlWriter.writeElementString("RetMsg", retMsg);
        retXmlWriter.writeElementString("SerialNo", serialNo);

        writeEnd();//写结束
    }
}
